package com.eyedsion.his.web.dao.dec.syncdata;

import com.eyedsion.his.web.dao.dec.JpaBaseRepository;
import com.eyedsion.his.web.entity.common.DecSyncLog;
import org.springframework.data.jpa.repository.Query;

import java.util.List;
import java.util.Map;

public interface DecSyncLogRepository extends JpaBaseRepository<DecSyncLog,Long>{

    /**
     *
     * @Description:查询昨天是否全量更新
     * @date： 2018/12/19 10:54
     * @return： boolean
     */
    @Query(value = "select count(1) from dec_sync_log t where t.type = 'businessData' and t.SYNC_TYPE = 1 and to_char(t.DEC_CREATE_TIME,'yyyy-mm-dd') = to_char(sysdate-1,'yyyy-mm-dd')",nativeQuery = true)
    long isYesterdayFullUpdate();


}
